home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / MoreFiles 1.3.1 / MoreFiles.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-04-16  |  26.4 KB  |  799 lines  |  [TEXT/MMCC]

  1. /*
  2. **    Apple Macintosh Developer Technical Support
  3. **
  4. **    The long lost high-level and FSSpec File Manager functions.
  5. **
  6. **    by Jim Luther, Apple Developer Technical Support
  7. **
  8. **    File:        MoreFiles.h
  9. **
  10. **    Copyright © 1992-1995 Apple Computer, Inc.
  11. **    All rights reserved.
  12. **
  13. **    You may incorporate this sample code into your applications without
  14. **    restriction, though the sample code has been provided "AS IS" and the
  15. **    responsibility for its operation is 100% yours.  However, what you are
  16. **    not permitted to do is to redistribute the source as "DSC Sample Code"
  17. **    after having made changes. If you're going to re-distribute the source,
  18. **    we require that you make it clear in the source that the code was
  19. **    descended from Apple Sample Code, but that you've made changes.
  20. */
  21.  
  22. #ifndef __MOREFILES__
  23. #define __MOREFILES__
  24.  
  25. #include <Types.h>
  26. #include <Files.h>
  27.  
  28. /*****************************************************************************/
  29.  
  30. pascal    OSErr    HGetVolParms(StringPtr volName,
  31.                              short vRefNum,
  32.                              GetVolParmsInfoBuffer *volParmsInfo,
  33.                              long *infoSize);
  34. /*    ¶ Determine the characteristics of a volume.
  35.     The HGetVolParms function returns information about the characteristics
  36.     of a volume. A result of paramErr usually just means the volume doesn't
  37.     support PBHGetVolParms and the feature you were going to check
  38.     for isn't available.
  39.  
  40.     volName            input:    A pointer to the name of a mounted volume
  41.                             or nil.
  42.     vRefNum            input:    Volume specification.
  43.     volParmsInfo    input:    Pointer to GetVolParmsInfoBuffer where the
  44.                             volume attributes information is returned.
  45.                     output:    Atributes information.
  46.     infoSize        input:    Size of buffer pointed to by volParmsInfo.
  47.                     output: Size of data actually returned.
  48.  
  49.     __________
  50.     
  51.     Also see the macros for checking attribute bits in MoreFilesExtras.h
  52. */
  53.  
  54. /*****************************************************************************/
  55.  
  56. pascal    OSErr    HCreateMinimum(short vRefNum,
  57.                                long dirID,
  58.                                ConstStr255Param fileName);
  59. /*    ¶ Create a new file with no creator or file type.
  60.     The HCreateMinimum function creates a new file without attempting to set
  61.     the creator and file type of the new file.  This function is needed to
  62.     create a file in an AppleShare "drop box" where the user can make
  63.     changes, but cannot see folder or files.
  64.     
  65.     vRefNum        input:    Volume specification.
  66.     dirID        input:    Directory ID.
  67.     fileName    input:    The name of the new file.
  68.  
  69.     __________
  70.     
  71.     Also see:    FSpCreateMinimum
  72. */
  73.  
  74. /*****************************************************************************/
  75.  
  76. pascal    OSErr    FSpCreateMinimum(const FSSpec *spec);
  77. /*    ¶ Create a new file with no creator or file type.
  78.     The FSpCreateMinimum function creates a new file without attempting to set 
  79.     the the creator and file type of the new file.  This function is needed to
  80.     create a file in an AppleShare "dropbox" where the user can make
  81.     changes, but cannot see folder or files. 
  82.     
  83.     spec        input:    An FSSpec record specifying the file to create.
  84.  
  85.     __________
  86.     
  87.     Also see:    HCreateMinimum
  88. */
  89.  
  90. /*****************************************************************************/
  91.  
  92. pascal    OSErr    ExchangeFiles(short vRefNum,
  93.                               long srcDirID,
  94.                               ConstStr255Param srcName,
  95.                               long dstDirID,
  96.                               ConstStr255Param dstName);
  97. /*    ¶ Exchange the data stored in two files on the same volume.
  98.     The ExchangeFiles function swaps the data in two files on the same
  99.     volume by changing some of the information in the volume catalog and,
  100.     if the files are open, in the file control blocks.
  101.  
  102.     vRefNum        input:    Volume specification.
  103.     srcDirID    input:    Source directory ID.
  104.     srcName        input:    Source file name.
  105.     dstDirID    input:    Destination directory ID.
  106.     dstName        input:    Destination file name.
  107.  
  108.     __________
  109.     
  110.     Also see:    FSpExchangeFilesCompat
  111. */
  112.  
  113. /*****************************************************************************/
  114.  
  115. pascal    OSErr    ResolveFileIDRef(StringPtr volName,
  116.                                  short vRefNum,
  117.                                  long fileID,
  118.                                  long *parID,
  119.                                  StringPtr fileName);
  120. /*    ¶ Retrieve the location of the file with the specified file ID.
  121.     The ResolveFileIDRef function returns the filename and parent directory ID
  122.     of the file with the specified file ID.
  123.     
  124.     volName    input:    A pointer to the name of a mounted volume
  125.                     or nil.
  126.     fileID    input:    The file ID.
  127.     vRefNum    input:    Volume specification.
  128.     parID    output:    The parent directory ID of the file.
  129.     name    input:    Points to a buffer (minimum Str63) where the filename
  130.                     is to be returned or must be nil.
  131.             output:    The filename.
  132.  
  133.     __________
  134.     
  135.     Also see:    CreateFileIDRef, FSpCreateFileIDRef, DeleteFileIDRef
  136. */
  137.  
  138. /*****************************************************************************/
  139.  
  140. pascal    OSErr    CreateFileIDRef(short vRefNum,
  141.                                 long parID,
  142.                                 ConstStr255Param fileName,
  143.                                 long *fileID);
  144. /*    ¶ Establish a file ID for a file.
  145.     The CreateFileIDRef function creates a file ID for the specified file,
  146.     or if a file ID already exists, supplies the file ID and returns the
  147.     result code fidExists
  148.  
  149.     vRefNum        input:    Volume specification.
  150.     parID        input:    Directory ID.
  151.     fileName    input:    The name of the file.
  152.     fileID        output:    The file ID.
  153.  
  154.     __________
  155.     
  156.     Also see:    ResolveFileIDRef, FSpCreateFileIDRef, DeleteFileIDRef
  157. */
  158.  
  159. /*****************************************************************************/
  160.  
  161. pascal    OSErr    FSpCreateFileIDRef(const FSSpec *spec,
  162.                                    long *fileID);
  163. /*    ¶ Establish a file ID for a file.
  164.     The FSpCreateFileIDRef function creates a file ID for the specified file,
  165.     or if a file ID already exists, supplies the file ID and returns the
  166.     result code fidExists
  167.  
  168.     spec        input:    An FSSpec record specifying the file.
  169.     fileID        output:    The file ID.
  170.  
  171.     __________
  172.     
  173.     Also see:    ResolveFileIDRef, CreateFileIDRef, DeleteFileIDRef
  174. */
  175.  
  176. /*****************************************************************************/
  177.  
  178. pascal    OSErr    DeleteFileIDRef(StringPtr volName,
  179.                                 short vRefNum,
  180.                                 long fileID);
  181. /*    ¶ Delete a file ID reference.
  182.     The DeleteFileIDRef function deletes a file ID reference.
  183.  
  184.     volName    input:    A pointer to the name of a mounted volume
  185.                     or nil.
  186.     vRefNum    input:    Volume specification.
  187.     fileID    input:    The file ID.
  188.  
  189.     __________
  190.     
  191.     Also see:    ResolveFileIDRef, CreateFileIDRef, FSpCreateFileIDRef
  192. */
  193.  
  194. /*****************************************************************************/
  195.  
  196. pascal    OSErr    FlushFile(short refNum);
  197. /*    ¶ Write the contents of a file's access path buffer (the fork data).
  198.     The FlushFile function writes the contents of a file's access path
  199.     buffer (the fork data) to the volume. Note: some of the file's catalog
  200.     information stored on the volume may not be correct until FlushVol
  201.     is called.
  202.  
  203.     refNum    input:    The file reference number of an open file.
  204. */
  205.  
  206. /*****************************************************************************/
  207.  
  208. pascal    OSErr    LockRange(short refNum,
  209.                           long rangeLength,
  210.                           long rangeStart);
  211. /*    ¶ Lock a portion of a file.
  212.     The LockRange function locks (denies access to) a portion of a file
  213.     that was opened with shared read/write permission.
  214.  
  215.     refNum        input:    The file reference number of an open file.
  216.     rangeLength    input:    The number of bytes in the range.
  217.     rangeStart    input:    The starting byte in the range to lock.
  218.  
  219.     __________
  220.     
  221.     Also see:    UnlockRange
  222. */
  223.  
  224. /*****************************************************************************/
  225.  
  226. pascal    OSErr    UnlockRange(short refNum,
  227.                             long rangeLength,
  228.                             long rangeStart);
  229. /*    ¶ Unlock a previously locked range.
  230.     The UnlockRange function unlocks (allows access to) a previously locked
  231.     portion of a file that was opened with shared read/write permission.
  232.  
  233.     refNum        input:    The file reference number of an open file.
  234.     rangeLength    input:    The number of bytes in the range.
  235.     rangeStart    input:    The starting byte in the range to unlock.
  236.  
  237.     __________
  238.     
  239.     Also see:    LockRange
  240. */
  241.  
  242. /*****************************************************************************/
  243.  
  244. pascal    OSErr    GetForeignPrivs(short vRefNum,
  245.                                 long dirID,
  246.                                 StringPtr name,
  247.                                 void *foreignPrivBuffer,
  248.                                 long *foreignPrivSize,
  249.                                 long *foreignPrivInfo1,
  250.                                 long *foreignPrivInfo2,
  251.                                 long *foreignPrivInfo3,
  252.                                 long *foreignPrivInfo4);
  253. /*    ¶ Retrieve the native access-control information.
  254.     The GetForeignPrivs function retrieves the native access-control
  255.     information for a file or directory stored on a volume managed by
  256.     a foreign file system.
  257.     
  258.     vRefNum                input:    Volume specification.
  259.     dirID                input:    Directory ID.
  260.     name                input:    Pointer to object name, or nil when dirID
  261.                                 specifies a directory that's the object.
  262.     foreignPrivBuffer    input:    Pointer to buffer where the privilege
  263.                                 information is returned.
  264.                         output:    Privilege information.
  265.     foreignPrivSize        input:    Size of buffer pointed to by
  266.                                 foreignPrivBuffer.
  267.                         output: Amount of buffer actually used.
  268.     foreignPrivInfo1    output:    Information specific to privilege model.
  269.     foreignPrivInfo2    output:    Information specific to privilege model.
  270.     foreignPrivInfo3    output:    Information specific to privilege model.
  271.     foreignPrivInfo4    output:    Information specific to privilege model.
  272.  
  273.     __________
  274.     
  275.     Also see:    FSpGetForeignPrivs, SetForeignPrivs, FSpSetForeignPrivs
  276. */
  277.  
  278. /*****************************************************************************/
  279.  
  280. pascal    OSErr    FSpGetForeignPrivs(const FSSpec *spec,
  281.                                    void *foreignPrivBuffer,
  282.                                    long *foreignPrivSize,
  283.                                    long *foreignPrivInfo1,
  284.                                    long *foreignPrivInfo2,
  285.                                    long *foreignPrivInfo3,
  286.                                    long *foreignPrivInfo4);
  287. /*    ¶ Retrieve the native access-control information.
  288.     The FSpGetForeignPrivs function retrieves the native access-control
  289.     information for a file or directory stored on a volume managed by
  290.     a foreign file system.
  291.     
  292.     spec                input:    An FSSpec record specifying the object.
  293.     foreignPrivBuffer    input:    Pointer to buffer where the privilege
  294.                                 information is returned.
  295.                         output:    Privilege information.
  296.     foreignPrivSize        input:    Size of buffer pointed to by
  297.                                 foreignPrivBuffer.
  298.                         output: Amount of buffer actually used.
  299.     foreignPrivInfo1    output:    Information specific to privilege model.
  300.     foreignPrivInfo2    output:    Information specific to privilege model.
  301.     foreignPrivInfo3    output:    Information specific to privilege model.
  302.     foreignPrivInfo4    output:    Information specific to privilege model.
  303.  
  304.     __________
  305.     
  306.     Also see:    GetForeignPrivs, SetForeignPrivs, FSpSetForeignPrivs
  307. */
  308.  
  309. /*****************************************************************************/
  310.  
  311. pascal    OSErr    SetForeignPrivs(short vRefNum,
  312.                                 long dirID,
  313.                                 StringPtr name,
  314.                                 void *foreignPrivBuffer,
  315.                                 long *foreignPrivSize,
  316.                                 long foreignPrivInfo1,
  317.                                 long foreignPrivInfo2,
  318.                                 long foreignPrivInfo3,
  319.                                 long foreignPrivInfo4);
  320. /*    ¶ Change the native access-control information.
  321.     The SetForeignPrivs function changes the native access-control
  322.     information for a file or directory stored on a volume managed by
  323.     a foreign file system.
  324.     
  325.     vRefNum                input:    Volume specification.
  326.     dirID                input:    Directory ID.
  327.     name                input:    Pointer to object name, or nil when dirID
  328.                                 specifies a directory that's the object.
  329.     foreignPrivBuffer    input:    Pointer to privilege information buffer.
  330.     foreignPrivSize        input:    Size of buffer pointed to by
  331.                                 foreignPrivBuffer.
  332.                         output: Amount of buffer actually used.
  333.     foreignPrivInfo1    input:    Information specific to privilege model.
  334.     foreignPrivInfo2    input:    Information specific to privilege model.
  335.     foreignPrivInfo3    input:    Information specific to privilege model.
  336.     foreignPrivInfo4    input:    Information specific to privilege model.
  337.  
  338.     __________
  339.     
  340.     Also see:    GetForeignPrivs, FSpGetForeignPrivs, FSpSetForeignPrivs
  341. */
  342.  
  343. /*****************************************************************************/
  344.  
  345. pascal    OSErr    FSpSetForeignPrivs(const FSSpec *spec,
  346.                                    void *foreignPrivBuffer,
  347.                                    long *foreignPrivSize,
  348.                                    long foreignPrivInfo1,
  349.                                    long foreignPrivInfo2,
  350.                                    long foreignPrivInfo3,
  351.                                    long foreignPrivInfo4);
  352. /*    ¶ Change the native access-control information.
  353.     The FSpSetForeignPrivs function changes the native access-control
  354.     information for a file or directory stored on a volume managed by
  355.     a foreign file system.
  356.     
  357.     spec                input:    An FSSpec record specifying the object.
  358.     foreignPrivBuffer    input:    Pointer to privilege information buffer.
  359.     foreignPrivSize        input:    Size of buffer pointed to by
  360.                                 foreignPrivBuffer.
  361.                         output: Amount of buffer actually used.
  362.     foreignPrivInfo1    input:    Information specific to privilege model.
  363.     foreignPrivInfo2    input:    Information specific to privilege model.
  364.     foreignPrivInfo3    input:    Information specific to privilege model.
  365.     foreignPrivInfo4    input:    Information specific to privilege model.
  366.  
  367.     __________
  368.     
  369.     Also see:    GetForeignPrivs, FSpGetForeignPrivs, SetForeignPrivs
  370. */
  371.  
  372. /*****************************************************************************/
  373.  
  374. pascal    OSErr    HGetLogInInfo(StringPtr volName,
  375.                               short vRefNum,
  376.                               short *loginMethod,
  377.                               StringPtr userName);
  378. /*    ¶ Get the login method and user name used to log on to a shared volume.
  379.     The HGetLogInInfo function retrieves the login method and user name
  380.     used to log on to a particular shared volume.
  381.     
  382.     volName        input:    A pointer to the name of a mounted volume
  383.                         or nil.
  384.     vRefNum        input:    The volume reference number.
  385.     loginMethod    output:    The login method used (kNoUserAuthentication,
  386.                         kPassword, kEncryptPassword, or
  387.                         kTwoWayEncryptPassword).
  388.     userName    input:    Points to a buffer (minimum Str31) where the user
  389.                         name is to be returned or must be nil.
  390.                 output:    The user name.
  391.  
  392.     __________
  393.     
  394.     Also see:    HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  395.                 FSpSetDirAccess, HMapName, HMapID
  396. */
  397.  
  398. /*****************************************************************************/
  399.  
  400. pascal    OSErr    HGetDirAccess(short vRefNum,
  401.                               long dirID,
  402.                               StringPtr name,
  403.                               long *ownerID,
  404.                               long *groupID,
  405.                               long *accessRights);
  406. /*    ¶ Get a directory's access control information on a shared volume.
  407.     The HGetDirAccess function retrieves the directory access control
  408.     information for a directory on a shared volume.
  409.     
  410.     vRefNum            input:    Volume specification.
  411.     dirID            input:    Directory ID.
  412.     name            input:    Pointer to directory name, or nil if dirID
  413.                             specifies the directory.
  414.     ownerID            output:    The directory's owner ID.
  415.     groupID            output:    The directory's group ID or
  416.                             0 if no group affiliation.
  417.     accessRights    output:    The directory's access rights.
  418.  
  419.     __________
  420.     
  421.     Also see:    HGetLogInInfo, FSpGetDirAccess, HSetDirAccess,
  422.                 FSpSetDirAccess, HMapName, HMapID
  423. */
  424.  
  425. /*****************************************************************************/
  426.  
  427. pascal    OSErr    FSpGetDirAccess(const FSSpec *spec,
  428.                                 long *ownerID,
  429.                                 long *groupID,
  430.                                 long *accessRights);
  431. /*    ¶ Get a directory's access control information on a shared volume.
  432.     The FSpGetDirAccess function retrieves the directory access control
  433.     information for a directory on a shared volume.
  434.     
  435.     spec            input:    An FSSpec record specifying the directory.
  436.     ownerID            output:    The directory's owner ID.
  437.     groupID            output:    The directory's group ID or
  438.                             0 if no group affiliation.
  439.     accessRights    output:    The directory's access rights.
  440.  
  441.     __________
  442.     
  443.     Also see:    HGetLogInInfo, HGetDirAccess, HSetDirAccess,
  444.                 FSpSetDirAccess, HMapName, HMapID
  445. */
  446.  
  447. /*****************************************************************************/
  448.  
  449. pascal    OSErr    HSetDirAccess(short vRefNum,
  450.                               long dirID,
  451.                               StringPtr name,
  452.                               long ownerID,
  453.                               long groupID,
  454.                               long accessRights);
  455. /*    ¶ Set a directory's access control information on a shared volume.
  456.     The HSetDirAccess function changes the directory access control
  457.     information for a directory on a shared volume. You must own a directory
  458.     to change its access control information.
  459.     
  460.     vRefNum            input:    Volume specification.
  461.     dirID            input:    Directory ID.
  462.     name            input:    Pointer to directory name, or nil if dirID
  463.                             specifies the directory.
  464.     ownerID            input:    The directory's owner ID.
  465.     groupID            input:    The directory's group ID or
  466.                             0 if no group affiliation.
  467.     accessRights    input:    The directory's access rights.
  468.  
  469.     __________
  470.     
  471.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess,
  472.                 FSpSetDirAccess, HMapName, HMapID
  473. */
  474.  
  475. /*****************************************************************************/
  476.  
  477. pascal    OSErr    FSpSetDirAccess(const FSSpec *spec,
  478.                                 long ownerID,
  479.                                 long groupID,
  480.                                 long accessRights);
  481. /*    ¶ Set a directory's access control information on a shared volume.
  482.     The FSpSetDirAccess function changes the directory access control
  483.     information for a directory on a shared volume. You must own a directory
  484.     to change its access control information.
  485.     
  486.     spec            input:    An FSSpec record specifying the directory.
  487.     ownerID            input:    The directory's owner ID.
  488.     groupID            input:    The directory's group ID or
  489.                             0 if no group affiliation.
  490.     accessRights    input:    The directory's access rights.
  491.  
  492.     __________
  493.     
  494.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  495.                 HMapName, HMapID
  496. */
  497.  
  498. /*****************************************************************************/
  499.  
  500. pascal    OSErr    HMapID(StringPtr volName,
  501.                        short vRefNum,
  502.                        long ugID,
  503.                        short objType,
  504.                        StringPtr name);
  505. /*    ¶ Map a user or group ID to a user or group name.
  506.     The HMapID function determines the name of a user or group if you know
  507.     the user or group ID.
  508.     
  509.     volName        input:    A pointer to the name of a mounted volume
  510.                         or nil.
  511.     vRefNum        input:    Volume specification.
  512.     objType        input:    The mapping function code: 1 if you're mapping a
  513.                         user ID to a user name or 2 if you're mapping a
  514.                         group ID to a group name.
  515.     name        input:    Points to a buffer (minimum Str31) where the user
  516.                         or group name is to be returned or must be nil.
  517.                 output:    The user or group name.
  518.  
  519.     __________
  520.     
  521.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  522.                 FSpSetDirAccess, HMapName
  523. */
  524.  
  525. /*****************************************************************************/
  526.  
  527. pascal    OSErr    HMapName(StringPtr volName,
  528.                          short vRefNum,
  529.                          ConstStr255Param name,
  530.                          short objType,
  531.                          long *ugID);
  532. /*    ¶ Map a user or group name to a user or group ID.
  533.     The HMapName function determines the user or group ID if you know the
  534.     user or group name.
  535.     
  536.     volName        input:    A pointer to the name of a mounted volume
  537.                         or nil.
  538.     vRefNum        input:    Volume specification.
  539.     name        input:    The user or group name.
  540.     objType        input:    The mapping function code: 3 if you're mapping a
  541.                         user name to a user ID or 4 if you're mapping a
  542.                         group name to a group ID.
  543.     ugID        output:    The user or group ID.
  544.  
  545.     __________
  546.     
  547.     Also see:    HGetLogInInfo, HGetDirAccess, FSpGetDirAccess, HSetDirAccess,
  548.                 FSpSetDirAccess, HMapID
  549. */
  550.  
  551. /*****************************************************************************/
  552.  
  553. pascal    OSErr    HCopyFile(short srcVRefNum,
  554.                           long srcDirID,
  555.                           ConstStr255Param srcName,
  556.                           short dstVRefNum,
  557.                           long dstDirID,
  558.                           StringPtr dstPathname,
  559.                           StringPtr copyName);
  560. /*    ¶ Duplicate a file on a file server and optionally to rename it.
  561.     The HCopyFile function duplicates a file and optionally to renames it.
  562.     The source and destination volumes must be on the same file server.
  563.     This function instructs the server to copy the file.
  564.     
  565.     srcVRefNum    input:    Source volume specification.
  566.     srcDirID    input:    Source directory ID.
  567.     srcName        input:    Source file name.
  568.     dstVRefNum    input:    Destination volume specification.
  569.     dstDirID    input:    Destination directory ID.
  570.     dstPathname    input:    Pointer to destination directory name, or
  571.                         nil when dstDirID specifies a directory.
  572.     copyName    input:    Points to the new file name if the file is to be
  573.                         renamed or nil if the file isn't to be renamed.
  574.  
  575.     __________
  576.     
  577.     Also see:    FSpCopyFile, FileCopy, FSpFileCopy
  578. */
  579.  
  580. /*****************************************************************************/
  581.  
  582. pascal    OSErr    FSpCopyFile(const FSSpec *srcSpec,
  583.                             const FSSpec *dstSpec,
  584.                             StringPtr copyName);
  585. /*    ¶ Duplicate a file on a file server and optionally to rename it.
  586.     The FSpCopyFile function duplicates a file and optionally to renames it.
  587.     The source and destination volumes must be on the same file server.
  588.     This function instructs the server to copy the file.
  589.     
  590.     srcSpec        input:    An FSSpec record specifying the source file.
  591.     dstSpec        input:    An FSSpec record specifying the destination
  592.                         directory.
  593.     copyName    input:    Points to the new file name if the file is to be
  594.                         renamed or nil if the file isn't to be renamed.
  595.  
  596.     __________
  597.     
  598.     Also see:    HCopyFile, FileCopy, FSpFileCopy
  599. */
  600.  
  601. /*****************************************************************************/
  602.  
  603. pascal    OSErr    HMoveRename(short vRefNum,
  604.                             long srcDirID,
  605.                             ConstStr255Param srcName,
  606.                             long dstDirID,
  607.                             StringPtr dstpathName,
  608.                             StringPtr copyName);
  609. /*    ¶ Move a file or directory on a file server and optionally to rename it.
  610.     The HMoveRename function moves a file or directory and optionally
  611.     renames it. The source and destination locations must be on the same
  612.     shared volume.
  613.     
  614.     vRefNum        input:    Volume specification.
  615.     srcDirID    input:    Source directory ID.
  616.     srcName        input:    The source object name.
  617.     dstDirID    input:    Destination directory ID.
  618.     dstName        input:    Pointer to destination directory name, or
  619.                         nil when dstDirID specifies a directory.
  620.     copyName    input:    Points to the new name if the object is to be
  621.                         renamed or nil if the object isn't to be renamed.
  622.  
  623.     __________
  624.     
  625.     Also see:    FSpMoveRename, HMoveRenameCompat, FSpMoveRenameCompat
  626. */
  627.  
  628. /*****************************************************************************/
  629.  
  630. pascal    OSErr    FSpMoveRename(const FSSpec *srcSpec,
  631.                               const FSSpec *dstSpec,
  632.                               StringPtr copyName);
  633. /*    ¶ Move a file or directory on a file server and optionally to rename it.
  634.     The FSpMoveRename function moves a file or directory and optionally
  635.     renames it. The source and destination locations must be on the same
  636.     shared volume.
  637.     
  638.     srcSpec        input:    An FSSpec record specifying the source object.
  639.     dstSpec        input:    An FSSpec record specifying the destination
  640.                         directory.
  641.     copyName    input:    Points to the new name if the object is to be
  642.                         renamed or nil if the object isn't to be renamed.
  643.  
  644.     __________
  645.     
  646.     Also see:    HMoveRename, HMoveRenameCompat, FSpMoveRenameCompat
  647. */
  648.  
  649. /*****************************************************************************/
  650.  
  651. pascal    OSErr    GetVolMountInfoSize(StringPtr volName,
  652.                                     short vRefNum,
  653.                                     short *size);
  654. /*    ¶ Get the size of a volume mounting information record.
  655.     The GetVolMountInfoSize function determines the how much space the
  656.     program needs to allocate for a volume mounting information record.
  657.     
  658.     volName        input:    A pointer to the name of a mounted volume
  659.                         or nil.
  660.     vRefNum        input:    Volume specification.
  661.     size        output:    The space needed (in bytes) of the volume mounting
  662.                         information record.
  663.  
  664.     __________
  665.     
  666.     Also see:    GetVolMountInfo, VolumeMount BuildAFPVolMountInfo,
  667.                 RetrieveAFPVolMountInfo
  668. */
  669.  
  670. /*****************************************************************************/
  671.  
  672. pascal    OSErr    GetVolMountInfo(StringPtr volName,
  673.                                 short vRefNum,
  674.                                 void *volMountInfo);
  675. /*    ¶ Retrieve a volume mounting information record.
  676.     The GetVolMountInfo function retrieves a volume mounting information
  677.     record containing all the information needed to mount the volume,
  678.     except for passwords.
  679.     
  680.     volName            input:    A pointer to the name of a mounted volume
  681.                             or nil.
  682.     vRefNum            input:    Volume specification.
  683.     volMountInfo    output:    Points to a volume mounting information
  684.                             record where the mounting information is to
  685.                             be returned.
  686.  
  687.     __________
  688.     
  689.     Also see:    GetVolMountInfoSize, VolumeMount, BuildAFPVolMountInfo,
  690.                 RetrieveAFPVolMountInfo
  691. */
  692.  
  693. /*****************************************************************************/
  694.  
  695. pascal    OSErr    VolumeMount(void *volMountInfo,
  696.                             short *vRefNum);
  697. /*    ¶ Mount a volume using a volume mounting information record.
  698.     The VolumeMount function mounts a volume using a volume mounting
  699.     information record.
  700.     
  701.     volMountInfo    input:    Points to a volume mounting information record.
  702.     vRefNum            output:    A volume reference number.
  703.  
  704.     __________
  705.     
  706.     Also see:    GetVolMountInfoSize, GetVolMountInfo, BuildAFPVolMountInfo,
  707.                 RetrieveAFPVolMountInfo
  708. */
  709.  
  710. /*****************************************************************************/
  711.  
  712. pascal    OSErr    Share(short vRefNum,
  713.                       long dirID,
  714.                       StringPtr name);
  715. /*    ¶ Establish a local volume or directory as a share point.
  716.     The Share function establishes a local volume or directory as a
  717.     share point.
  718.  
  719.     vRefNum            input:    Volume specification.
  720.     dirID            input:    Directory ID.
  721.     name            input:    Pointer to directory name, or nil if dirID
  722.                             specifies the directory.
  723.  
  724.     __________
  725.     
  726.     Also see:    FSpShare, Unshare, FSpUnshare
  727. */
  728.  
  729. /*****************************************************************************/
  730.  
  731. pascal    OSErr    FSpShare(const FSSpec *spec);
  732. /*    ¶ Establish a local volume or directory as a share point.
  733.     The FSpShare function establishes a local volume or directory as a
  734.     share point.
  735.  
  736.     spec    input:    An FSSpec record specifying the share point.
  737.  
  738.     Also see:    Share, Unshare, FSpUnshare
  739. */
  740.  
  741. /*****************************************************************************/
  742.  
  743. pascal    OSErr    Unshare(short vRefNum,
  744.                         long dirID,
  745.                         StringPtr name);
  746. /*    ¶ Remove a share point.
  747.     The Unshare function removes a share point.
  748.  
  749.     vRefNum            input:    Volume specification.
  750.     dirID            input:    Directory ID.
  751.     name            input:    Pointer to directory name, or nil if dirID
  752.                             specifies the directory.
  753.  
  754.     __________
  755.     
  756.     Also see:    Share, FSpShare, FSpUnshare
  757. */
  758.  
  759. /*****************************************************************************/
  760.  
  761. pascal    OSErr    FSpUnshare(const FSSpec *spec);
  762. /*    ¶ Remove a share point.
  763.     The FSpUnshare function removes a share point.
  764.  
  765.     spec    input:    An FSSpec record specifying the share point.
  766.  
  767.     __________
  768.     
  769.     Also see:    Share, FSpShare, Unshare
  770. */
  771.  
  772. /*****************************************************************************/
  773.  
  774. pascal    OSErr    GetUGEntry(short objType,
  775.                            StringPtr objName,
  776.                            long *objID);
  777. /*    ¶ Retrieve a user or group entry from the local file server.
  778.     The GetUGEntry function retrieves user or group entries from the
  779.     local file server.
  780.  
  781.     objType        input:    The object type: -1 = group; 0 = user
  782.     objName        input:    Points to a buffer (minimum Str31) where the user
  783.                         or group name is to be returned or must be nil.
  784.                 output:    The user or group name.
  785.     objID        input:    O to get the first user or group. If the entry objID
  786.                         last returned by GetUGEntry is passed, then user or
  787.                         group whose alphabetically next in the list of entries
  788.                         is returned.
  789.                 output:    The user or group ID.
  790.  
  791.     __________
  792.     
  793.     Also see:    GetUGEntries
  794. */
  795.  
  796. /*****************************************************************************/
  797.  
  798. #endif    /* __MOREFILES__ */
  799.